package com.dianxun.exam.adapter.provider;

import com.chad.library.adapter.base.BaseViewHolder;
import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.dianxun.exam.R;
import com.dianxun.exam.common.AppKeyManager;
import com.dianxun.exam.entity.TitleEntity;
import com.dianxun.exam.entity.TypeEntity;

/**
 * 标题
 */
public class TitleProvider extends BaseItemProvider<TypeEntity ,BaseViewHolder> {

    @Override
    public int viewType() {
        return AppKeyManager.TYPE_TITLE;
    }

    @Override
    public int layout() {
        return R.layout.item_exam_title;
    }

    @Override
    public void convert(BaseViewHolder helper, TypeEntity data, int position) {
        TitleEntity entity = (TitleEntity) data;
        helper.setText(R.id.tv_title, entity.getContent());
    }

    @Override
    public void onClick(BaseViewHolder helper, TypeEntity data, int position) {

    }

    @Override
    public boolean onLongClick(BaseViewHolder helper, TypeEntity data, int position) {
        return true;
    }
}
